package fr.kirin.logger.model;

import java.awt.Color;

import javax.swing.Icon;

import fr.kirin.logger.i18n.I18N;
import fr.kirin.logger.model.gui.IconFactory;


/**
 *Default leve implementation. 
 * 
 * @author kirin
 *
 */
public enum DefaultLevel implements Level {

    /**
     * 
     */
	NONE{
		public Color getColor(){
			return Color.GRAY;
			
		}
		public int getValue(){
			return -1;
		}
		public Icon getIcon(){
			return IconFactory.getDefaultIcon();
		}
		
		public String getName() {
			return "";
		}
		
		public String getShortName() {
			return "";
		}
	},
	/**
	 * information level
	 */
	INFO{
		public Color getColor(){
			return INFO_GREEN;
		}
		public int getValue(){
			return 0;
		}
		public Icon getIcon(){
			return IconFactory.getInfoIcon();
		}
		public String getName() {
			return I18N.getMessage("information");
		}
		
		public String getShortName() {
			return "[INFO]";
		}
	},
	/**
	 * warning level
	 */
	WARNING{
		public Color getColor(){
			return Color.ORANGE;
		}
		public int getValue(){
			return 1;
		}
		public Icon getIcon(){
			return IconFactory.getWarningIcon();	
		}
		public String getName() {
			return I18N.getMessage("warning");
		}
		
		public String getShortName() {
			return "[WARN]";
		}
	},
	/**
	 * error level
	 */
	ERROR{
		public Color getColor(){
			return Color.RED;
		}
		public int getValue(){
			return 2;
		}
		public Icon getIcon(){
			return IconFactory.getErrorIcon();
		}
		public String getName() {
			return I18N.getMessage("error");
		}
		
		public String getShortName() {
			return "[ERR]";
		}
	};
	
	
	private static final  Color INFO_GREEN = new Color(61,186,34);
	
	
	
}
